package cn.lzy.web.Servlet;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;


//@WebFilter(value = {"/antionLogin1","/antionMyFilter1"})

// 自定义 MyFilter 类
//@Component
public class MyFilter implements Filter {    // http://localhost:8080/myFilter
    @Override
    public void init(FilterConfig filterConfig) throws ServletException{ }
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
            throws IOException,ServletException{
            System.out.println("hello MyFilter !!");
            // filterChain.doFilter(servletRequest,servletResponse);
    }
    @Override
    public void destroy( ){ }

}
